<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('单位公开信息设置')"/>
    <th:block th:include="include :: datetimepicker-css"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <div class="row">
        <div class="col-sm-12">
            <div class="panel panel-info">
                <div class="panel-heading">
                    <i class="fa fa-info-circle" th:text="${dwmc}"></i>
                </div>

                <div class="panel-body">
                    <form class="form-horizontal m" id="form-unit-edit">
                        <input name="unitDisplayId" th:field="${unitDisplay.unitDisplayId}" type="hidden">
                        <input name="dwdzDzbm" th:field="${unitDisplay.dwdzDzbm}" type="hidden">
                        <div class="row">
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">单位分类:</label>
                                    <div class="col-sm-8">
                                        <label class="toggle-switch switch-solid">
                                            <input type="checkbox" id="gaglDwfl"
                                                   th:checked="(${unitDisplay.gaglDwfl}=='1') ? 'true' : 'false'">
                                            <span></span>
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">实际名称:</label>
                                    <div class="col-sm-8">
                                        <label class="toggle-switch switch-solid">
                                            <input type="checkbox" id="sjmc"
                                                   th:checked="(${unitDisplay.sjmc}=='1') ? 'true' : 'false'">
                                            <span></span>
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">单位类型:</label>
                                    <div class="col-sm-8">
                                        <label class="toggle-switch switch-solid">
                                            <input type="checkbox" id="dwlxdm"
                                                   th:checked="(${unitDisplay.dwlxdm}=='1') ? 'true' : 'false'">
                                            <span></span>
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">经济类型:</label>
                                    <div class="col-sm-8">
                                        <label class="toggle-switch switch-solid">
                                            <input type="checkbox" id="jjlxdm"
                                                   th:checked="(${unitDisplay.jjlxdm}=='1') ? 'true' : 'false'">
                                            <span></span>
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">行业类别:</label>
                                    <div class="col-sm-8">
                                        <label class="toggle-switch switch-solid">
                                            <input type="checkbox" id="hylbdm"
                                                   th:checked="(${unitDisplay.hylbdm}=='1') ? 'true' : 'false'">
                                            <span></span>
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">主营:</label>
                                    <div class="col-sm-8">
                                        <label class="toggle-switch switch-solid">
                                            <input type="checkbox" id="jyfwzy"
                                                   th:checked="(${unitDisplay.jyfwzy}=='1') ? 'true' : 'false'">
                                            <span></span>
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">兼营:</label>
                                    <div class="col-sm-8">
                                        <label class="toggle-switch switch-solid">
                                            <input type="checkbox" id="jyfwjy"
                                                   th:checked="(${unitDisplay.jyfwjy}=='1') ? 'true' : 'false'">
                                            <span></span>
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">经营面积:</label>
                                    <div class="col-sm-8">
                                        <label class="toggle-switch switch-solid">
                                            <input type="checkbox" id="jymjMjpfm"
                                                   th:checked="(${unitDisplay.jymjMjpfm}=='1') ? 'true' : 'false'">
                                            <span></span>
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">经营方式:</label>
                                    <div class="col-sm-8">
                                        <label class="toggle-switch switch-solid">
                                            <input type="checkbox" id="jyfs"
                                                   th:checked="(${unitDisplay.jyfs}=='1') ? 'true' : 'false'">
                                            <span></span>
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">营业执照号:</label>
                                    <div class="col-sm-8">
                                        <label class="toggle-switch switch-solid">
                                            <input type="checkbox" id="yyzzh"
                                                   th:checked="(${unitDisplay.yyzzh}=='1') ? 'true' : 'false'">
                                            <span></span>
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">注册资金:</label>
                                    <div class="col-sm-8">
                                        <label class="toggle-switch switch-solid">
                                            <input type="checkbox" id="zczb"
                                                   th:checked="(${unitDisplay.zczb}=='1') ? 'true' : 'false'">
                                            <span></span>
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">联系电话:</label>
                                    <div class="col-sm-8">
                                        <label class="toggle-switch switch-solid">
                                            <input type="checkbox" id="lxdh"
                                                   th:checked="(${unitDisplay.lxdh}=='1') ? 'true' : 'false'">
                                            <span></span>
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">网址:</label>
                                    <div class="col-sm-8">
                                        <label class="toggle-switch switch-solid">
                                            <input type="checkbox" id="wz"
                                                   th:checked="(${unitDisplay.wz}=='1') ? 'true' : 'false'">
                                            <span></span>
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">法定代表人姓名:</label>
                                    <div class="col-sm-8">
                                        <label class="toggle-switch switch-solid">
                                            <input type="checkbox" id="fddbrXm"
                                                   th:checked="(${unitDisplay.fddbrXm}=='1') ? 'true' : 'false'">
                                            <span></span>
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">法定代表人公民身份号码:</label>
                                    <div class="col-sm-8">
                                        <label class="toggle-switch switch-solid">
                                            <input type="checkbox" id="fddbrGmsfhm"
                                                   th:checked="(${unitDisplay.fddbrGmsfhm}=='1') ? 'true' : 'false'">
                                            <span></span>
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">法定代表人联系电话:</label>
                                    <div class="col-sm-8">
                                        <label class="toggle-switch switch-solid">
                                            <input type="checkbox" id="fddbrLxdh"
                                                   th:checked="(${unitDisplay.fddbrLxdh}=='1') ? 'true' : 'false'">
                                            <span></span>
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">单位管理级别:</label>
                                    <div class="col-sm-8">
                                        <label class="toggle-switch switch-solid">
                                            <input type="checkbox" id="dwgljb"
                                                   th:checked="(${unitDisplay.dwgljb}=='1') ? 'true' : 'false'">
                                            <span></span>
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">登记时间:</label>
                                    <div class="col-sm-8">
                                        <label class="toggle-switch switch-solid">
                                            <input type="checkbox" id="djsj"
                                                   th:checked="(${unitDisplay.djsj}=='1') ? 'true' : 'false'">
                                            <span></span>
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">核录时间:</label>
                                    <div class="col-sm-8">
                                        <label class="toggle-switch switch-solid">
                                            <input type="checkbox" id="hlsj"
                                                   th:checked="(${unitDisplay.hlsj}=='1') ? 'true' : 'false'">
                                            <span></span>
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">数据来源:</label>
                                    <div class="col-sm-8">
                                        <label class="toggle-switch switch-solid">
                                            <input type="checkbox" id="sjly"
                                                   th:checked="(${unitDisplay.sjly}=='1') ? 'true' : 'false'">
                                            <span></span>
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">安全出入口通道数:</label>
                                    <div class="col-sm-8">
                                        <label class="toggle-switch switch-solid">
                                            <input type="checkbox" id="aqcrktds"
                                                   th:checked="(${unitDisplay.aqcrktds}=='1') ? 'true' : 'false'">
                                            <span></span>
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">从业人员总数:</label>
                                    <div class="col-sm-8">
                                        <label class="toggle-switch switch-solid">
                                            <input type="checkbox" id="cyryzs"
                                                   th:checked="(${unitDisplay.cyryzs}=='1') ? 'true' : 'false'">
                                            <span></span>
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">经营状态:</label>
                                    <div class="col-sm-8">
                                        <label class="toggle-switch switch-solid">
                                            <input type="checkbox" id="jyzt"
                                                   th:checked="(${unitDisplay.jyzt}=='1') ? 'true' : 'false'">
                                            <span></span>
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">标签:</label>
                                    <div class="col-sm-8">
                                        <label class="toggle-switch switch-solid">
                                            <input type="checkbox" id="bq"
                                                   th:checked="(${unitDisplay.bq}=='1') ? 'true' : 'false'">
                                            <span></span>
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-12">
                                <div class="form-group">
                                    <label class="col-xs-2 control-label">信息发布：</label>
                                    <div class="col-xs-10">
                                        <textarea name="gkxx" maxlength="300" class="form-control" rows="3">[[*{unitDisplay.gkxx}]]</textarea>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<th:block th:include="include :: footer"/>
<th:block th:include="include :: datetimepicker-js"/>
<script type="text/javascript">
    var prefix = ctx + "control/display";

    $("#form-unit-edit").validate({
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            var data = $("#form-unit-edit").serializeArray();
            var gaglDwfl = $("input[id='gaglDwfl']").is(':checked') === true ? 1 : 0;
            var sjmc = $("input[id='sjmc']").is(':checked') === true ? 1 : 0;
            var dwlxdm = $("input[id='dwlxdm']").is(':checked') === true ? 1 : 0;
            var jjlxdm = $("input[id='jjlxdm']").is(':checked') === true ? 1 : 0;
            var hylbdm = $("input[id='hylbdm']").is(':checked') === true ? 1 : 0;
            var jyfwzy = $("input[id='jyfwzy']").is(':checked') === true ? 1 : 0;
            var jyfwjy = $("input[id='jyfwjy']").is(':checked') === true ? 1 : 0;
            var jymjMjpfm = $("input[id='jymjMjpfm']").is(':checked') === true ? 1 : 0;
            var jyfs = $("input[id='jyfs']").is(':checked') === true ? 1 : 0;
            var yyzzh = $("input[id='yyzzh']").is(':checked') === true ? 1 : 0;
            var zczb = $("input[id='zczb']").is(':checked') === true ? 1 : 0;
            var lxdh = $("input[id='lxdh']").is(':checked') === true ? 1 : 0;
            var wz = $("input[id='wz']").is(':checked') === true ? 1 : 0;
            var fddbrXm = $("input[id='fddbrXm']").is(':checked') === true ? 1 : 0;
            var fddbrGmsfhm = $("input[id='fddbrGmsfhm']").is(':checked') === true ? 1 : 0;
            var fddbrLxdh = $("input[id='fddbrLxdh']").is(':checked') === true ? 1 : 0;
            var dwgljb = $("input[id='dwgljb']").is(':checked') === true ? 1 : 0;
            var djsj = $("input[id='djsj']").is(':checked') === true ? 1 : 0;
            var hlsj = $("input[id='hlsj']").is(':checked') === true ? 1 : 0;
            var sjly = $("input[id='sjly']").is(':checked') === true ? 1 : 0;
            var aqcrktds = $("input[id='aqcrktds']").is(':checked') === true ? 1 : 0;
            var cyryzs = $("input[id='cyryzs']").is(':checked') === true ? 1 : 0;
            var jyzt = $("input[id='jyzt']").is(':checked') === true ? 1 : 0;
            var bq = $("input[id='bq']").is(':checked') === true ? 1 : 0;

            data.push({"name": "gaglDwfl", "value": gaglDwfl});
            data.push({"name": "sjmc", "value": sjmc});
            data.push({"name": "dwlxdm", "value": dwlxdm});
            data.push({"name": "jjlxdm", "value": jjlxdm});
            data.push({"name": "hylbdm", "value": hylbdm});
            data.push({"name": "jyfwzy", "value": jyfwzy});
            data.push({"name": "jyfwjy", "value": jyfwjy});
            data.push({"name": "jymjMjpfm", "value": jymjMjpfm});
            data.push({"name": "jyfs", "value": jyfs});
            data.push({"name": "yyzzh", "value": yyzzh});
            data.push({"name": "zczb", "value": zczb});
            data.push({"name": "lxdh", "value": lxdh});
            data.push({"name": "wz", "value": wz});
            data.push({"name": "fddbrXm", "value": fddbrXm});
            data.push({"name": "fddbrGmsfhm", "value": fddbrGmsfhm});
            data.push({"name": "fddbrLxdh", "value": fddbrLxdh});
            data.push({"name": "dwgljb", "value": dwgljb});
            data.push({"name": "djsj", "value": djsj});
            data.push({"name": "hlsj", "value": hlsj});
            data.push({"name": "sjly", "value": sjly});
            data.push({"name": "aqcrktds", "value": aqcrktds});
            data.push({"name": "cyryzs", "value": cyryzs});
            data.push({"name": "jyzt", "value": jyzt});
            data.push({"name": "bq", "value": bq});
            $.operate.save(prefix + "/setUnitDisplay", data);
        }
    }
</script>
</body>
</html>
